package com.qzsoft.zhjd.server.modules.sysstation.service.impl;

import com.qzsoft.zhjd.server.modules.sysstation.entity.CollectSysStationEntity;
import com.qzsoft.zhjd.server.modules.sysstation.enums.SysStationType;
import com.qzsoft.zhjd.server.modules.sysstation.mapper.CollectSysStationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.qzsoft.zhjd.server.modules.sysstation.service.CollectSysStationService;

/**
 * @ClassName SysStationServiceImpl
 * @Description 拌合楼业务接口实现
 * @author linhuawei
 * @since 2021-12-06
 */
@Service
public class CollectSysStationServiceImpl implements CollectSysStationService {

    @Autowired
    private CollectSysStationMapper collectSysStationMapper;


    @Override
    public CollectSysStationEntity getById(SysStationType type, String id) {
        if (null == type) {
            return null;
        }
        QueryWrapper<CollectSysStationEntity> queryWrapper = new QueryWrapper<CollectSysStationEntity>();
        queryWrapper.eq("id", id);
        queryWrapper.eq("type", type.getValue());
        return collectSysStationMapper.selectOne(queryWrapper);
    }

}
